package org.dev.vlp.dto;

import lombok.Data;
import org.dev.vlp.constants.EnumMomentType;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * Description
 * Param
 * return
 * Author:86184
 * Date: 2023/1/10
 */
@Data
public class PublishMomentParam {
//    @NotNull
//    private EnumMomentType type;

    @Length(max = 250)
    private String content;

    @Size(max = 9)
    @Valid
    private List<Image> imageList;

    private Integer communityId;

    @Data
    public static class Image {
        @NotBlank
        @Length(max = 255)
        private String url;

        @NotNull
        private Integer width;

        @NotNull
        private Integer height;
    }
}
